object DM: TDM
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Left = 347
  Top = 132
  Height = 563
  Width = 777
  object sql_SGE: TSQLConnection
    ConnectionName = 'sisadmin'
    DriverName = 'UIB FireBird15'
    GetDriverFunc = 'getSQLDriverINTERBASE'
    LibraryName = 'dbexpUIBfire15.dll'
    LoginPrompt = False
    Params.Strings = (
      'DriverName=UIB FireBird15'
      'BlobSize=-1'
      'CommitRetain=False'
      'Database=localhost:citrus'
      'ErrorResourceFile='
      'LocaleCode=0000'
      'Password=masterkey'
      'RoleName=RoleName'
      'ServerCharSet=win1252'
      'SQLDialect=3'
      'Interbase TransIsolation=ReadCommited'
      'User_Name=SYSDBA'
      'WaitOnLocks=True')
    VendorLib = 'fbclient.dll'
    Left = 40
    Top = 16
  end
  object s_Cotas: TSQLDataSet
    CommandText = 
      'select n.*,'#13#10'          t.NOMETRANSP, t.CODTRANSP, t.PLACATRANSP,' +
      ' t.CNPJ_CPF, '#13#10'          c.CTR_N_CONTRATO, '#13#10'          fc.NOMEFO' +
      'RNECEDOR as COMPRADOR,'#13#10'          f.NOMEFORNECEDOR as EMPREITEIR' +
      'O,'#13#10'          fo.NOMEFORNECEDOR as PROPRIETARIO,'#13#10'          po.C' +
      'ODPRODUTO, po.CODPRO,  po.PRODUTO, '#13#10'          p.PRO_DESCRICAO a' +
      's PROPRIEDADE '#13#10'   from NOTASPORCONTRATO n '#13#10'   inner join  CONT' +
      'RATOS c on c.CTR_ID = n.CTR_ID '#13#10'   left outer join TRANSPORTADO' +
      'RA t on t.CODTRANSP = n.NTC_MOTORISTA '#13#10'   left outer join PRODU' +
      'TOS po on po.CODPRODUTO = n.NTC_PRODUTO '#13#10'   inner join PROPRIED' +
      'ADES p on p.PRO_ID = c.PRO_ID '#13#10'   left outer join FORNECEDOR fc' +
      ' on fc.CODFORNECEDOR =    c.CTR_COMPRADOR '#13#10'   left outer join F' +
      'ORNECEDOR f on f.CODFORNECEDOR =    c.CTR_TURMEIRO'#13#10'   left oute' +
      'r join FORNECEDOR fo on fo.CODFORNECEDOR = c.FOR_ID '#13#10'where  n.N' +
      'TC_ID = :nc'#13#10
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'nc'
        ParamType = ptInput
      end>
    SQLConnection = sql_SGE
    Left = 26
    Top = 77
    object s_CotasNTC_ID: TIntegerField
      FieldName = 'NTC_ID'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object s_CotasPGC_ID: TIntegerField
      FieldName = 'PGC_ID'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasCTR_ID: TIntegerField
      FieldName = 'CTR_ID'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_MOTORISTA: TIntegerField
      FieldName = 'NTC_MOTORISTA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_QUTDENF: TIntegerField
      FieldName = 'NTC_QUTDENF'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_FRETISTA: TIntegerField
      FieldName = 'NTC_FRETISTA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_DATA: TDateField
      FieldName = 'NTC_DATA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_ENTRADA: TDateField
      FieldName = 'NTC_ENTRADA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_SAIDA: TDateField
      FieldName = 'NTC_SAIDA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_STATUS: TStringField
      FieldName = 'NTC_STATUS'
      ProviderFlags = [pfInUpdate]
      Size = 10
    end
    object s_CotasNTC_PRODUTO: TIntegerField
      FieldName = 'NTC_PRODUTO'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_PESOBRUTO: TFloatField
      FieldName = 'NTC_PESOBRUTO'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_REFUGO: TFloatField
      FieldName = 'NTC_REFUGO'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_OUTROS: TFloatField
      FieldName = 'NTC_OUTROS'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_PESOTARA: TFloatField
      FieldName = 'NTC_PESOTARA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_PESOLIQUIDO: TFloatField
      FieldName = 'NTC_PESOLIQUIDO'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_USUARIOPORTARIA: TIntegerField
      FieldName = 'NTC_USUARIOPORTARIA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_USUARIOBALANCA: TIntegerField
      FieldName = 'NTC_USUARIOBALANCA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNTC_IDCOMPRA: TIntegerField
      FieldName = 'NTC_IDCOMPRA'
      ProviderFlags = [pfInUpdate]
    end
    object s_CotasNOMETRANSP: TStringField
      FieldName = 'NOMETRANSP'
      ProviderFlags = []
      Size = 50
    end
    object s_CotasCODTRANSP: TIntegerField
      FieldName = 'CODTRANSP'
      ProviderFlags = []
    end
    object s_CotasPLACATRANSP: TStringField
      FieldName = 'PLACATRANSP'
      ProviderFlags = []
      Size = 8
    end
    object s_CotasCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
      ProviderFlags = []
    end
    object s_CotasCTR_N_CONTRATO: TStringField
      FieldName = 'CTR_N_CONTRATO'
      ProviderFlags = []
      Required = True
      Size = 15
    end
    object s_CotasCOMPRADOR: TStringField
      FieldName = 'COMPRADOR'
      ProviderFlags = []
      Size = 30
    end
    object s_CotasEMPREITEIRO: TStringField
      FieldName = 'EMPREITEIRO'
      ProviderFlags = []
      Size = 50
    end
    object s_CotasPROPRIETARIO: TStringField
      FieldName = 'PROPRIETARIO'
      ProviderFlags = []
      Size = 50
    end
    object s_CotasCODPRODUTO: TIntegerField
      FieldName = 'CODPRODUTO'
      ProviderFlags = []
    end
    object s_CotasCODPRO: TStringField
      FieldName = 'CODPRO'
      ProviderFlags = []
      Size = 15
    end
    object s_CotasPRODUTO: TStringField
      FieldName = 'PRODUTO'
      ProviderFlags = []
      Size = 300
    end
    object s_CotasPROPRIEDADE: TStringField
      FieldName = 'PROPRIEDADE'
      ProviderFlags = []
      Size = 100
    end
  end
  object p_Cotas: TDataSetProvider
    DataSet = s_Cotas
    UpdateMode = upWhereKeyOnly
    Left = 72
    Top = 77
  end
  object ds_Cotas: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'nc'
        ParamType = ptInput
      end>
    ProviderName = 'p_Cotas'
    Left = 120
    Top = 77
    object ds_CotasNTC_ID: TIntegerField
      FieldName = 'NTC_ID'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object ds_CotasPGC_ID: TIntegerField
      FieldName = 'PGC_ID'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasCTR_ID: TIntegerField
      FieldName = 'CTR_ID'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_MOTORISTA: TIntegerField
      FieldName = 'NTC_MOTORISTA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_QUTDENF: TIntegerField
      FieldName = 'NTC_QUTDENF'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_FRETISTA: TIntegerField
      FieldName = 'NTC_FRETISTA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_DATA: TDateField
      FieldName = 'NTC_DATA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_ENTRADA: TDateField
      FieldName = 'NTC_ENTRADA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_SAIDA: TDateField
      FieldName = 'NTC_SAIDA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_STATUS: TStringField
      FieldName = 'NTC_STATUS'
      ProviderFlags = [pfInUpdate]
      Size = 10
    end
    object ds_CotasNTC_PRODUTO: TIntegerField
      FieldName = 'NTC_PRODUTO'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_PESOBRUTO: TFloatField
      FieldName = 'NTC_PESOBRUTO'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_REFUGO: TFloatField
      FieldName = 'NTC_REFUGO'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_OUTROS: TFloatField
      FieldName = 'NTC_OUTROS'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_PESOTARA: TFloatField
      FieldName = 'NTC_PESOTARA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_PESOLIQUIDO: TFloatField
      FieldName = 'NTC_PESOLIQUIDO'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_USUARIOPORTARIA: TIntegerField
      FieldName = 'NTC_USUARIOPORTARIA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_USUARIOBALANCA: TIntegerField
      FieldName = 'NTC_USUARIOBALANCA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNTC_IDCOMPRA: TIntegerField
      FieldName = 'NTC_IDCOMPRA'
      ProviderFlags = [pfInUpdate]
    end
    object ds_CotasNOMETRANSP: TStringField
      FieldName = 'NOMETRANSP'
      ProviderFlags = []
      Size = 50
    end
    object ds_CotasCODTRANSP: TIntegerField
      FieldName = 'CODTRANSP'
      ProviderFlags = []
    end
    object ds_CotasPLACATRANSP: TStringField
      FieldName = 'PLACATRANSP'
      ProviderFlags = []
      Size = 8
    end
    object ds_CotasCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
      ProviderFlags = []
    end
    object ds_CotasCTR_N_CONTRATO: TStringField
      FieldName = 'CTR_N_CONTRATO'
      ProviderFlags = []
      Required = True
      Size = 15
    end
    object ds_CotasCOMPRADOR: TStringField
      FieldName = 'COMPRADOR'
      ProviderFlags = []
      Size = 30
    end
    object ds_CotasEMPREITEIRO: TStringField
      FieldName = 'EMPREITEIRO'
      ProviderFlags = []
      Size = 50
    end
    object ds_CotasPROPRIETARIO: TStringField
      FieldName = 'PROPRIETARIO'
      ProviderFlags = []
      Size = 50
    end
    object ds_CotasCODPRODUTO: TIntegerField
      FieldName = 'CODPRODUTO'
      ProviderFlags = []
    end
    object ds_CotasCODPRO: TStringField
      FieldName = 'CODPRO'
      ProviderFlags = []
      Size = 15
    end
    object ds_CotasPRODUTO: TStringField
      FieldName = 'PRODUTO'
      ProviderFlags = []
      Size = 300
    end
    object ds_CotasPROPRIEDADE: TStringField
      FieldName = 'PROPRIEDADE'
      ProviderFlags = []
      Size = 100
    end
  end
  object busca_variedade: TSQLClientDataSet
    CommandText = 
      'select v.*, '#13#10'          p.CODPRODUTO,'#13#10'          p.PRODUTO, '#13#10'  ' +
      '        p.UNIDADEMEDIDA,'#13#10'          p.CODPRO  '#13#10'   from VARIEDAD' +
      'ECONTRATADA v'#13#10'inner join PRODUTOS p on  p.CODPRODUTO = v.VRC_ID' +
      'PROD '#13#10'where  p.PRODUTO Like :prod '#13#10'    and  v.VRC_IDCONT= :id'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'prod'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 442
    Top = 99
    object busca_variedadeCODPRO: TStringField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODPRO'
      Size = 15
    end
    object busca_variedadePRODUTO: TStringField
      DisplayLabel = 'Produto'
      FieldName = 'PRODUTO'
      Required = True
      Size = 300
    end
    object busca_variedadeVRC_ID: TIntegerField
      FieldName = 'VRC_ID'
      Required = True
      Visible = False
    end
    object busca_variedadeVRC_IDCONT: TIntegerField
      FieldName = 'VRC_IDCONT'
      Required = True
      Visible = False
    end
    object busca_variedadeVRC_IDPROD: TIntegerField
      FieldName = 'VRC_IDPROD'
      Required = True
      Visible = False
    end
    object busca_variedadeVRC_QUTDE: TFloatField
      FieldName = 'VRC_QUTDE'
      Visible = False
    end
    object busca_variedadeVRP_QUTDECX: TFloatField
      FieldName = 'VRP_QUTDECX'
      Visible = False
    end
    object busca_variedadeVRC_PRECOUNT: TFloatField
      FieldName = 'VRC_PRECOUNT'
      Visible = False
    end
    object busca_variedadeVRC_TOTAL: TFloatField
      FieldName = 'VRC_TOTAL'
      Visible = False
    end
    object busca_variedadeCODPRODUTO: TIntegerField
      FieldName = 'CODPRODUTO'
      Required = True
      Visible = False
    end
    object busca_variedadeUNIDADEMEDIDA: TStringField
      FieldName = 'UNIDADEMEDIDA'
      Visible = False
      FixedChar = True
      Size = 2
    end
  end
  object buscaMotorista: TSQLClientDataSet
    CommandText = 'select * from TRANSPORTADORA '#13#10'where NOMETRANSP LIKE :desc'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'desc'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 440
    Top = 53
    object buscaMotoristaPLACATRANSP: TStringField
      DisplayLabel = 'Placa do Caminh'#227'o'
      FieldName = 'PLACATRANSP'
      Size = 30
    end
    object buscaMotoristaNOMETRANSP: TStringField
      DisplayLabel = 'Descri'#231#227'o'
      FieldName = 'NOMETRANSP'
      Size = 50
    end
    object buscaMotoristaCODTRANSP: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODTRANSP'
      Visible = False
    end
    object buscaMotoristaCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
      Visible = False
    end
    object buscaMotoristaEND_TRANSP: TStringField
      FieldName = 'END_TRANSP'
      Visible = False
      Size = 80
    end
    object buscaMotoristaCIDADE_TRANSP: TStringField
      FieldName = 'CIDADE_TRANSP'
      Visible = False
      Size = 50
    end
    object buscaMotoristaUF_VEICULO_TRANSP: TStringField
      FieldName = 'UF_VEICULO_TRANSP'
      Visible = False
      FixedChar = True
      Size = 2
    end
    object buscaMotoristaUF_TRANSP: TStringField
      FieldName = 'UF_TRANSP'
      Visible = False
      FixedChar = True
      Size = 2
    end
    object buscaMotoristaFRETE: TStringField
      FieldName = 'FRETE'
      Visible = False
      FixedChar = True
      Size = 1
    end
    object buscaMotoristaINSCRICAOESTADUAL: TStringField
      FieldName = 'INSCRICAOESTADUAL'
      Visible = False
    end
    object buscaMotoristaCORPONF1: TStringField
      FieldName = 'CORPONF1'
      Visible = False
      Size = 75
    end
    object buscaMotoristaCORPONF2: TStringField
      FieldName = 'CORPONF2'
      Visible = False
      Size = 75
    end
    object buscaMotoristaCORPONF3: TStringField
      FieldName = 'CORPONF3'
      Visible = False
      Size = 75
    end
    object buscaMotoristaCORPONF4: TStringField
      FieldName = 'CORPONF4'
      Visible = False
      Size = 75
    end
    object buscaMotoristaCORPONF5: TStringField
      FieldName = 'CORPONF5'
      Visible = False
      Size = 75
    end
    object buscaMotoristaCORPONF6: TStringField
      FieldName = 'CORPONF6'
      Visible = False
      Size = 75
    end
    object buscaMotoristaFONE: TStringField
      FieldName = 'FONE'
      Visible = False
      Size = 15
    end
    object buscaMotoristaFONE2: TStringField
      FieldName = 'FONE2'
      Visible = False
      Size = 15
    end
    object buscaMotoristaFAX: TStringField
      FieldName = 'FAX'
      Visible = False
      Size = 15
    end
    object buscaMotoristaCONTATO: TStringField
      FieldName = 'CONTATO'
      Visible = False
      Size = 40
    end
    object buscaMotoristaBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Visible = False
      Size = 40
    end
    object buscaMotoristaCEP: TStringField
      FieldName = 'CEP'
      Visible = False
      Size = 15
    end
    object buscaMotoristaFANTASIA: TStringField
      FieldName = 'FANTASIA'
      Visible = False
      Size = 50
    end
    object buscaMotoristaEMAIL: TStringField
      FieldName = 'EMAIL'
      Visible = False
      Size = 100
    end
  end
  object buscaContrato: TSQLClientDataSet
    CommandText = 
      'select v.VRC_IDCONT, v.VRC_PRECOUNT, v.VRC_QUTDE,'#13#10'       pd.COD' +
      'PRO, pd.PRODUTO, pd.CODPRODUTO,  '#13#10'       c.CTR_ID, c.CTR_N_CONT' +
      'RATO, '#13#10'       p.PRO_ID, p.PRO_DESCRICAO,'#13#10'       u.NOMEUSUARIO ' +
      'as COMPRADOR, u.CODUSUARIO,'#13#10'       f.NOMEFORNECEDOR as EMPREITE' +
      'IRO,  f.CODFORNECEDOR '#13#10'  from VARIEDADECONTRATADA v  '#13#10'   inner' +
      ' join CONTRATOS c on c.CTR_ID = v.VRC_IDCONT'#13#10'   inner join PROD' +
      'UTOS pd on pd.CODPRODUTO = v.VRC_IDPROD'#13#10'   inner join PROPRIEDA' +
      'DES p on p.PRO_ID = c.PRO_ID '#13#10'   left outer join USUARIO u on u' +
      '.CODUSUARIO = c.CTR_COMPRADOR '#13#10'   left outer join FORNECEDOR f ' +
      'on f.CODFORNECEDOR =    c. CTR_TURMEIRO'#13#10'where c.CTR_N_CONTRATO ' +
      'LIKE :desc'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftInteger
        Name = 'desc'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 439
    Top = 6
    object buscaContratoCTR_N_CONTRATO: TStringField
      DisplayLabel = 'N'#186' Contrato'
      FieldName = 'CTR_N_CONTRATO'
      Required = True
      Size = 15
    end
    object buscaContratoPRODUTO: TStringField
      FieldName = 'PRODUTO'
      Required = True
      Size = 300
    end
    object buscaContratoPRO_DESCRICAO: TStringField
      DisplayLabel = 'Propriedade'
      FieldName = 'PRO_DESCRICAO'
      Size = 100
    end
    object buscaContratoCOMPRADOR: TStringField
      DisplayLabel = 'Comprador'
      FieldName = 'COMPRADOR'
      Size = 30
    end
    object buscaContratoEMPREITEIRO: TStringField
      DisplayLabel = 'Empreiteiro'
      FieldName = 'EMPREITEIRO'
      Size = 50
    end
    object buscaContratoCODUSUARIO: TSmallintField
      FieldName = 'CODUSUARIO'
      Visible = False
    end
    object buscaContratoCTR_ID: TIntegerField
      FieldName = 'CTR_ID'
      Required = True
      Visible = False
    end
    object buscaContratoCODFORNECEDOR: TIntegerField
      FieldName = 'CODFORNECEDOR'
      Visible = False
    end
    object buscaContratoVRC_IDCONT: TIntegerField
      FieldName = 'VRC_IDCONT'
      Required = True
    end
    object buscaContratoVRC_PRECOUNT: TFloatField
      FieldName = 'VRC_PRECOUNT'
    end
    object buscaContratoVRC_QUTDE: TFloatField
      FieldName = 'VRC_QUTDE'
    end
    object buscaContratoCODPRO: TStringField
      FieldName = 'CODPRO'
      Size = 15
    end
    object buscaContratoPRO_ID: TIntegerField
      FieldName = 'PRO_ID'
      Required = True
      Visible = False
    end
    object buscaContratoCODPRODUTO: TIntegerField
      FieldName = 'CODPRODUTO'
      Visible = False
    end
  end
  object buscaColhedor: TSQLClientDataSet
    CommandText = 
      'select codFornecedor , nomefornecedor '#13#10'from fornecedor '#13#10'where ' +
      '(NOMEFORNECEDOR like :pFORNECEDOR) '#13#10'and (segmento = 3) '#13#10'and (R' +
      'EGIAO = 3)'#13#10'order by NOMEFORNECEDOR'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'pFORNECEDOR'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 440
    Top = 208
    object buscaColhedorCODFORNECEDOR: TIntegerField
      FieldName = 'CODFORNECEDOR'
      Required = True
    end
    object buscaColhedorNOMEFORNECEDOR: TStringField
      FieldName = 'NOMEFORNECEDOR'
      Required = True
      Size = 50
    end
  end
  object busca_propriedade: TSQLClientDataSet
    CommandText = 
      'select  PRO_ID, PRO_DESCRICAO'#13#10'   from PROPRIEDADES '#13#10'where PRO_' +
      'DESCRICAO LIKE :desc'#13#10'   and FOR_ID = :id'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'desc'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 440
    Top = 148
    object busca_propriedadePRO_ID: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'PRO_ID'
      Required = True
    end
    object busca_propriedadePRO_DESCRICAO: TStringField
      DisplayLabel = 'Descri'#231#227'o'
      FieldName = 'PRO_DESCRICAO'
      Size = 100
    end
  end
  object scds_cli_proc: TSQLClientDataSet
    CommandText = 
      'SELECT c.CODCLIENTE, c.NOMECLIENTE, c.RAZAOSOCIAL, ec.DDD, ec.TE' +
      'LEFONE'#13#10'FROM CLIENTES c, ENDERECOCLIENTE ec'#13#10'where c.CODCLIENTE ' +
      '= ec.CODCLIENTE and ec.TIPOEND = 0'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    DBConnection = sql_SGE
    Left = 441
    Top = 301
    object scds_cli_procCODCLIENTE: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODCLIENTE'
      Required = True
    end
    object scds_cli_procNOMECLIENTE: TStringField
      DisplayLabel = 'Nome'
      FieldName = 'NOMECLIENTE'
      Required = True
      Size = 50
    end
    object scds_cli_procRAZAOSOCIAL: TStringField
      DisplayLabel = 'Raz'#227'o Social'
      FieldName = 'RAZAOSOCIAL'
      Required = True
      Size = 50
    end
    object scds_cli_procDDD: TStringField
      FieldName = 'DDD'
      Size = 3
    end
    object scds_cli_procTELEFONE: TStringField
      DisplayLabel = 'Telefone'
      FieldName = 'TELEFONE'
      Size = 9
    end
  end
  object scds_usuario_proc: TSQLClientDataSet
    CommandText = 
      'select * from USUARIO where  ((NOMEUSUARIO like :PUSUARIO) or  (' +
      'CODUSUARIO = :pCODUSU))  and ((PERFIL = :pPerfil ) or (PERFIL = ' +
      ':pPerfil1)) and STATUS = 1 order by NOMEUSUARIO'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'PUSUARIO'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'pCODUSU'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'pPerfil'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'pPerfil1'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 440
    Top = 256
    object scds_usuario_procCODUSUARIO: TSmallintField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODUSUARIO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object scds_usuario_procNOMEUSUARIO: TStringField
      DisplayLabel = 'Nome'
      FieldName = 'NOMEUSUARIO'
      Required = True
      Size = 30
    end
    object scds_usuario_procSTATUS: TSmallintField
      DisplayLabel = 'Status'
      FieldName = 'STATUS'
      Required = True
    end
    object scds_usuario_procPERFIL: TStringField
      DisplayLabel = 'Perfil'
      FieldName = 'PERFIL'
      Size = 15
    end
  end
  object scds_Prod: TSQLClientDataSet
    CommandText = 
      'Select CODPRODUTO, CODPRO, PRODUTO, VALOR_PRAZO from PRODUTOS WH' +
      'ERE '#13#10'TIPO = '#39'SERV'#39' and ((PRODUTO LIKE :PRODUTO) OR (:PRODUTO = ' +
      #39'TODOS'#39'))'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'PRODUTO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'PRODUTO'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 440
    Top = 351
    object scds_ProdCODPRODUTO: TIntegerField
      FieldName = 'CODPRODUTO'
      Required = True
    end
    object scds_ProdCODPRO: TStringField
      FieldName = 'CODPRO'
      Size = 15
    end
    object scds_ProdPRODUTO: TStringField
      FieldName = 'PRODUTO'
      Required = True
      Size = 300
    end
    object scds_ProdVALOR_PRAZO: TFloatField
      FieldName = 'VALOR_PRAZO'
    end
  end
  object scds_forn_proc: TSQLClientDataSet
    CommandText = 
      'select f.CODFORNECEDOR, f.NOMEFORNECEDOR, f.RAZAOSOCIAL, ef.DDD,' +
      ' ef.TELEFONE,  f.PRAZOPAGAMENTO'#13#10'from FORNECEDOR f'#13#10'left outer j' +
      'oin ENDERECOFORNECEDOR EF on EF.CODFORNECEDOR = F.CODFORNECEDOR'#13 +
      #10'where ((f.NOMEFORNECEDOR like :pFORNECEDOR) or (f.RAZAOSOCIAL l' +
      'ike :pRAZAO) or (f.CODFORNECEDOR = :pCODFORNECEDOR)) '#13#10'and  (f.s' +
      'tatus = :pStatus) '#13#10'and  (((f.segmento = :pSegmento) or (f.segme' +
      'nto = 1) ) or (:pSegmento = 1 ))'#13#10'and ( (ef.TIPOEND = 0) or (ef.' +
      'TIPOEND is null) )'#13#10'order by f.NOMEFORNECEDOR'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'pFORNECEDOR'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'pRAZAO'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'pCODFORNECEDOR'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'pStatus'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'pSegmento'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'pSegmento'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 442
    Top = 397
    object scds_forn_procCODFORNECEDOR: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODFORNECEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object scds_forn_procNOMEFORNECEDOR: TStringField
      DisplayLabel = 'Nome'
      FieldName = 'NOMEFORNECEDOR'
      Required = True
      Size = 50
    end
    object scds_forn_procRAZAOSOCIAL: TStringField
      DisplayLabel = 'Raz'#227'o Social'
      FieldName = 'RAZAOSOCIAL'
      Required = True
      Size = 50
    end
    object scds_forn_procDDD: TSmallintField
      FieldName = 'DDD'
    end
    object scds_forn_procTELEFONE: TStringField
      DisplayLabel = 'Telefone'
      FieldName = 'TELEFONE'
      Size = 9
    end
    object scds_forn_procPRAZOPAGAMENTO: TSmallintField
      DisplayLabel = 'Prazo'
      FieldName = 'PRAZOPAGAMENTO'
    end
  end
  object proc_transp: TSQLClientDataSet
    CommandText = 'select * from TRANSPORTADORA '#13#10'where NOMETRANSP like :pTRANSP'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'pTRANSP'
        ParamType = ptInput
      end>
    DBConnection = sql_SGE
    Left = 233
    Top = 244
    object proc_transpCODTRANSP: TIntegerField
      FieldName = 'CODTRANSP'
      Required = True
    end
    object proc_transpPLACATRANSP: TStringField
      FieldName = 'PLACATRANSP'
      Size = 50
    end
    object proc_transpNOMETRANSP: TStringField
      FieldName = 'NOMETRANSP'
      Size = 50
    end
    object proc_transpFANTASIA: TStringField
      FieldName = 'FANTASIA'
      Size = 50
    end
    object proc_transpCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
    end
    object proc_transpEND_TRANSP: TStringField
      FieldName = 'END_TRANSP'
      Size = 80
    end
    object proc_transpCIDADE_TRANSP: TStringField
      FieldName = 'CIDADE_TRANSP'
      Size = 50
    end
    object proc_transpUF_VEICULO_TRANSP: TStringField
      FieldName = 'UF_VEICULO_TRANSP'
      FixedChar = True
      Size = 2
    end
    object proc_transpUF_TRANSP: TStringField
      FieldName = 'UF_TRANSP'
      FixedChar = True
      Size = 2
    end
    object proc_transpFRETE: TStringField
      FieldName = 'FRETE'
      FixedChar = True
      Size = 1
    end
    object proc_transpINSCRICAOESTADUAL: TStringField
      FieldName = 'INSCRICAOESTADUAL'
    end
    object proc_transpCORPONF1: TStringField
      FieldName = 'CORPONF1'
      Size = 75
    end
    object proc_transpCORPONF2: TStringField
      FieldName = 'CORPONF2'
      Size = 75
    end
    object proc_transpCORPONF3: TStringField
      FieldName = 'CORPONF3'
      Size = 75
    end
    object proc_transpCORPONF4: TStringField
      FieldName = 'CORPONF4'
      Size = 75
    end
    object proc_transpCORPONF5: TStringField
      FieldName = 'CORPONF5'
      Size = 75
    end
    object proc_transpCORPONF6: TStringField
      FieldName = 'CORPONF6'
      Size = 75
    end
  end
  object dsTransp: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'pTRANSP'
        ParamType = ptInput
      end>
    ProviderName = 'dspTransp'
    Left = 167
    Top = 147
    object dsTranspCODTRANSP: TIntegerField
      FieldName = 'CODTRANSP'
    end
    object dsTranspNOMETRANSP: TStringField
      FieldName = 'NOMETRANSP'
      Size = 50
    end
    object dsTranspPLACATRANSP: TStringField
      FieldName = 'PLACATRANSP'
      EditMask = 'LLL0000;1;_'
      Size = 16
    end
    object dsTranspCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
    end
    object dsTranspEND_TRANSP: TStringField
      FieldName = 'END_TRANSP'
      Size = 80
    end
    object dsTranspCIDADE_TRANSP: TStringField
      FieldName = 'CIDADE_TRANSP'
      Size = 50
    end
    object dsTranspUF_VEICULO_TRANSP: TStringField
      FieldName = 'UF_VEICULO_TRANSP'
      FixedChar = True
      Size = 2
    end
    object dsTranspUF_TRANSP: TStringField
      FieldName = 'UF_TRANSP'
      FixedChar = True
      Size = 2
    end
    object dsTranspFRETE: TStringField
      FieldName = 'FRETE'
      FixedChar = True
      Size = 1
    end
    object dsTranspINSCRICAOESTADUAL: TStringField
      FieldName = 'INSCRICAOESTADUAL'
    end
    object dsTranspCORPONF6: TStringField
      FieldName = 'CORPONF6'
      Size = 75
    end
    object dsTranspCORPONF5: TStringField
      FieldName = 'CORPONF5'
      Size = 75
    end
    object dsTranspCORPONF1: TStringField
      FieldName = 'CORPONF1'
      Size = 75
    end
    object dsTranspCORPONF2: TStringField
      FieldName = 'CORPONF2'
      Size = 75
    end
    object dsTranspCORPONF3: TStringField
      FieldName = 'CORPONF3'
      Size = 75
    end
    object dsTranspCORPONF4: TStringField
      FieldName = 'CORPONF4'
      Size = 75
    end
    object dsTranspFONE: TStringField
      FieldName = 'FONE'
      Size = 15
    end
    object dsTranspFONE2: TStringField
      FieldName = 'FONE2'
      Size = 15
    end
    object dsTranspFAX: TStringField
      FieldName = 'FAX'
      Size = 15
    end
    object dsTranspCONTATO: TStringField
      FieldName = 'CONTATO'
      Size = 40
    end
    object dsTranspCEP: TStringField
      FieldName = 'CEP'
      EditMask = '00000\-999;1;_'
      Size = 15
    end
    object dsTranspBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 40
    end
    object dsTranspFANTASIA: TStringField
      FieldName = 'FANTASIA'
      Size = 50
    end
    object dsTranspEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 100
    end
  end
  object dspTransp: TDataSetProvider
    DataSet = sdsTransp
    UpdateMode = upWhereKeyOnly
    Left = 87
    Top = 147
  end
  object sdsTransp: TSQLDataSet
    CommandText = 'select * from TRANSPORTADORA where CODTRANSP=:pTRANSP'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'pTRANSP'
        ParamType = ptInput
      end>
    SQLConnection = sql_SGE
    Left = 23
    Top = 147
    object sdsTranspCODTRANSP: TIntegerField
      FieldName = 'CODTRANSP'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object sdsTranspNOMETRANSP: TStringField
      FieldName = 'NOMETRANSP'
      ProviderFlags = [pfInUpdate]
      Size = 50
    end
    object sdsTranspPLACATRANSP: TStringField
      FieldName = 'PLACATRANSP'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object sdsTranspCNPJ_CPF: TStringField
      FieldName = 'CNPJ_CPF'
      ProviderFlags = [pfInUpdate]
    end
    object sdsTranspEND_TRANSP: TStringField
      FieldName = 'END_TRANSP'
      ProviderFlags = [pfInUpdate]
      Size = 80
    end
    object sdsTranspCIDADE_TRANSP: TStringField
      FieldName = 'CIDADE_TRANSP'
      ProviderFlags = [pfInUpdate]
      Size = 50
    end
    object sdsTranspUF_VEICULO_TRANSP: TStringField
      FieldName = 'UF_VEICULO_TRANSP'
      ProviderFlags = [pfInUpdate]
      FixedChar = True
      Size = 2
    end
    object sdsTranspUF_TRANSP: TStringField
      FieldName = 'UF_TRANSP'
      ProviderFlags = [pfInUpdate]
      FixedChar = True
      Size = 2
    end
    object sdsTranspFRETE: TStringField
      FieldName = 'FRETE'
      ProviderFlags = [pfInUpdate]
      FixedChar = True
      Size = 1
    end
    object sdsTranspINSCRICAOESTADUAL: TStringField
      FieldName = 'INSCRICAOESTADUAL'
      ProviderFlags = [pfInUpdate]
    end
    object sdsTranspCORPONF6: TStringField
      FieldName = 'CORPONF6'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspCORPONF5: TStringField
      FieldName = 'CORPONF5'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspCORPONF1: TStringField
      FieldName = 'CORPONF1'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspCORPONF2: TStringField
      FieldName = 'CORPONF2'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspCORPONF3: TStringField
      FieldName = 'CORPONF3'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspCORPONF4: TStringField
      FieldName = 'CORPONF4'
      ProviderFlags = [pfInUpdate]
      Size = 75
    end
    object sdsTranspFONE: TStringField
      FieldName = 'FONE'
      Size = 15
    end
    object sdsTranspFONE2: TStringField
      FieldName = 'FONE2'
      Size = 15
    end
    object sdsTranspFAX: TStringField
      FieldName = 'FAX'
      Size = 15
    end
    object sdsTranspCONTATO: TStringField
      FieldName = 'CONTATO'
      Size = 40
    end
    object sdsTranspCEP: TStringField
      FieldName = 'CEP'
      Size = 15
    end
    object sdsTranspBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 40
    end
    object sdsTranspFANTASIA: TStringField
      FieldName = 'FANTASIA'
      Size = 50
    end
    object sdsTranspEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 100
    end
  end
  object ds_6_genid: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'd_6'
    Left = 339
    Top = 78
    object ds_6_genidCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Required = True
    end
  end
  object d_6: TDataSetProvider
    DataSet = s_6
    Options = [poAllowCommandText]
    Left = 267
    Top = 78
  end
  object s_6: TSQLDataSet
    CommandText = 
      'SELECT CAST(GEN_ID(GEN_COD_PAGAMENTO, 1) AS INTEGER) AS CODIGO F' +
      'ROM RDB$DATABASE;'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = sql_SGE
    Left = 203
    Top = 78
    object s_6CODIGO: TIntegerField
      FieldName = 'CODIGO'
      Required = True
    end
  end
  object UCDBXConnFinanceiro: TUCDBXConn
    Connection = sql_SGE
    Left = 80
    Top = 312
  end
end
